Vue.component('Menu-Component', { template : `
` , created(){ const _this = this; call_api("GET", "/event/events-link", {"mastercode" : 10}, function(data){ _this.events_link = data.slice(0,6); }); let pathname = window.location.pathname; switch (pathname){ case "/diarystory2024/index.asp" : default : _this.active_category = "main"; break; case "/diarystory2024/category.asp" : _this.active_category = "category"; break; case "/diarystory2024/ranking.asp" : _this.active_category = "ranking"; break; } } , data(){ return { events_link : [] , today : new Date().getMonth()+1 + "/" + new Date().getDate() , active_category : "main" , search_keyword : "" } } , methods : { go_event(evt_code, index){ this.send_amplitude('click_diary2024_mainmenu', {'index' : index+3, 'type' : 'event', "eventcode" : evt_code}); parent.location.href='/event/eventmain.asp?eventid='+evt_code + '&diarystory=true'; } , send_amplitude(name, data){ fnAmplitudeEventActionJsonData(name, JSON.stringify(data)); } } });